/**동기식아작스선언*/
jQuery.extend({
	syncPost: function(url, data, callback, type, async) {
		if (jQuery.isFunction(data)) {
			callback = data;
			data = {};
		}
		return jQuery.ajax({
			type: "POST",
			url: url,
			data: data,
			success: callback,
			dataType: type,
			async: async
		});
	}
});

$(document).ready(function() {
	/**메세지박스*/
	window.Alert = function(title, msg, obj) {
		$('<div title="'+title+'"><p>'+msg+'</p></div>').dialog({
			autoOpen: true,
			width: 500,
			resizable: false,
			modal: true,
			closeOnEscape: false,
			buttons: [{text: "확인", click: function() {
					$(this).dialog("close");
					if (obj) {
						obj.focus();
					}
			}}]
		});
	};
	
	/**검색폼 Submit**/
	window.fn_submitSearchFrm = function(frm, obj) {
		if(obj.value != null && obj.value != "") {
			frm.submit();
		}
		else return false;
	};
});